(global.webpackJsonp = global.webpackJsonp || []).push([ [ "pages/public/register" ], {
    "3fdf": function(t, e, o) {
        (function(t) {
            o("767a"), n(o("66fd"));
            var e = n(o("d44f"));
            function n(t) {
                return t && t.__esModule ? t : {
                    default: t
                };
            }
            wx.__webpack_require_UNI_MP_PLUGIN__ = o, t(e.default);
        }).call(this, o("543d").createPage);
    },
    "543b": function(t, e, n) {
        n.r(e);
        var o, r = n("ebc0"), c = n.n(r);
        for (o in r) "default" !== o && function(t) {
            n.d(e, t, function() {
                return r[t];
            });
        }(o);
        e.default = c.a;
    },
    "735f": function(t, e, n) {
        n.d(e, "b", function() {
            return o;
        }), n.d(e, "c", function() {
            return r;
        }), n.d(e, "a", function() {});
        var o = function() {
            this.$createElement;
            this._self._c;
        }, r = [];
    },
    aab8: function(t, e, n) {
        var o = n("dd05");
        n.n(o).a;
    },
    d44f: function(t, e, n) {
        n.r(e);
        var o, r = n("735f"), c = n("543b");
        for (o in c) "default" !== o && function(t) {
            n.d(e, t, function() {
                return c[t];
            });
        }(o);
        n("aab8");
        var i = n("f0c5"), r = Object(i.a)(c.default, r.b, r.c, !1, null, null, null, !1, r.a, void 0);
        e.default = r.exports;
    },
    dd05: function(t, e, n) {},
    ebc0: function(t, i, a) {
        (function(n) {
            Object.defineProperty(i, "__esModule", {
                value: !0
            }), i.default = void 0;
            var t, r = (t = a("a34a")) && t.__esModule ? t : {
                default: t
            }, e = a("26cb");
            function u(t, e, n, o, r, c, i) {
                try {
                    var a = t[c](i), u = a.value;
                } catch (t) {
                    return n(t), 0;
                }
                a.done ? e(u) : Promise.resolve(u).then(o, r);
            }
            function c(e, t) {
                var n, o = Object.keys(e);
                return Object.getOwnPropertySymbols && (n = Object.getOwnPropertySymbols(e), t && (n = n.filter(function(t) {
                    return Object.getOwnPropertyDescriptor(e, t).enumerable;
                })), o.push.apply(o, n)), o;
            }
            function o(o) {
                for (var t = 1; t < arguments.length; t++) {
                    var r = null != arguments[t] ? arguments[t] : {};
                    t % 2 ? c(Object(r), !0).forEach(function(t) {
                        var e, n;
                        e = o, t = r[n = t], n in e ? Object.defineProperty(e, n, {
                            value: t,
                            enumerable: !0,
                            configurable: !0,
                            writable: !0
                        }) : e[n] = t;
                    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(r)) : c(Object(r)).forEach(function(t) {
                        Object.defineProperty(o, t, Object.getOwnPropertyDescriptor(r, t));
                    });
                }
                return o;
            }
            e = {
                data: function() {
                    return {
                        mobile: "",
                        code: {
                            text: "获取验证码",
                            status: !1,
                            value: ""
                        },
                        password: "",
                        isTcp: !1,
                        sysInfo: n.getStorageSync("sysInfo")
                    };
                },
                computed: o({}, (0, e.mapState)({
                    initData: function(t) {
                        return t.init.initData;
                    }
                })),
                onLoad: function() {},
                methods: o(o({}, (0, e.mapActions)([ "setTokenAndBack" ])), {}, {
                    jump: function(t, e) {
                        this.$Router.push({
                            path: t,
                            query: e
                        });
                    },
                    getCode: function() {
                        var a, e = this;
                        return a = r.default.mark(function t() {
                            var n, o;
                            return r.default.wrap(function(t) {
                                for (;;) switch (t.prev = t.next) {
                                  case 0:
                                    (n = e).code.status = !0, o = 60, n.$api("sms.send", {
                                        mobile: n.mobile,
                                        event: "register"
                                    }).then(function(t) {
                                        var e;
                                        1 === t.code ? (n.code.text = o + "秒", n.code.status = !0, e = setInterval(function() {
                                            0 < o ? (n.code.text = o - 1 + "秒", o--) : (clearInterval(e), n.code.text = "获取验证码", 
                                            n.code.status = !1);
                                        }, 1e3)) : n.code.status = !1;
                                    });

                                  case 4:
                                  case "end":
                                    return t.stop();
                                }
                            }, t);
                        }), function() {
                            var t = this, i = arguments;
                            return new Promise(function(e, n) {
                                var o = a.apply(t, i);
                                function r(t) {
                                    u(o, e, n, r, c, "next", t);
                                }
                                function c(t) {
                                    u(o, e, n, r, c, "throw", t);
                                }
                                r(void 0);
                            });
                        }();
                    },
                    register: function() {
                        var e = this;
                        this.isTcp ? this.$api("user.register", {
                            mobile: this.mobile,
                            code: this.code.value,
                            password: this.password
                        }).then(function(t) {
                            1 === t.code && n.showToast({
                                title: t.msg || "注册成功,请前往登录",
                                icon: "success",
                                duration: 1e3,
                                mask: !0,
                                success: function() {
                                    e.setTokenAndBack(t.data.userinfo.token);
                                }
                            });
                        }) : this.$tools.toast("请先同意协议！");
                    },
                    onTcp: function() {
                        this.isTcp = !this.isTcp;
                    }
                })
            };
            i.default = e;
        }).call(this, a("543d").default);
    }
}, [ [ "3fdf", "common/runtime", "common/vendor" ] ] ]);